package com.bunnyhsu;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@ServletComponentScan
@EnableTransactionManagement
@EnableAsync
@MapperScan("com.bunnyhsu.mapper") //配置扫描mapper接口的地址
public class SuggestSystemApplication extends SpringBootServletInitializer implements CommandLineRunner{

	@Override
	protected SpringApplicationBuilder configure(
			SpringApplicationBuilder application) {
		return application.sources(SuggestSystemApplication.class);
	}

	public static void main(String[] args) {
		SpringApplication springApplication = new SpringApplication(SuggestSystemApplication.class);
		springApplication.run(args);
	}
	@Override
	public void run(String... strings) throws Exception {
		System.out.println("启动完成！");
	}
}
